package com.ling.config;

import org.springframework.context.annotation.Bean;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import java.util.List;

/**
 * ResposeInfoHttpMessageConverter
 */
//@Configuration
public class ResponseInfoConfig extends WebMvcConfigurerAdapter {
    @Bean
    public ResposeInfoHttpMessageConverter resposeInfoHttpMessageConverter() {
        return new ResposeInfoHttpMessageConverter();
    }

    public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
        converters.add(resposeInfoHttpMessageConverter());
        super.configureMessageConverters(converters);
    }
}
